<?php
$this->Paginator->options(array(
    'update' => '#content-table-inner',
    'evalScripts' => true
));
$pageOption = $this->Paginator->params();
?>

		<div id="content-table-inner">

				<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
				<tr>
					<th class="table-header-repeat line-left minwidth-1">
               <?php echo $this->Paginator->sort('key', 'Ticket ID'); ?>
          </th>
					<th class="table-header-repeat line-left minwidth-1">
               <?php echo $this->Paginator->sort('subject', 'Subject'); ?>
          </th>
					<th class="table-header-repeat line-left minwidth-1">
               <?php echo $this->Paginator->sort('email', 'Email'); ?>
          </th>
					<th class="table-header-repeat line-left minwidth-1">
               <?php echo __('SLA'); ?>
          </th>
					<th class="table-header-repeat line-left">
               <?php echo $this->Paginator->sort('created', 'Created'); ?>
          </th>
					<th class="table-header-repeat line-left">
               Action
          </th>          
				</tr>

<?php foreach ($tickets as $ticket): ?>
    <tr>
        <td><?php echo $ticket['Ticket']['id']; ?></td>
        <td>
            <?php echo $ticket['Ticket']['subject']; ?>
        </td>
        <td>
            <?php echo $ticket['Ticket']['email']; ?>
        </td>
        <td>
            <?php echo 'To be create'; ?>
        </td>
        <td>
            <?php echo $ticket['Ticket']['created']; ?>
        </td>
        <td>
            <?php echo $this->Html->link('Detail', array('action' => 'view', $ticket['Ticket']['id'], 'admin' => true)); ?>
        </td>
    </tr>
<?php endforeach; ?>

</table>
			<div class="clear"></div>
		<!--  start paging..................................................... -->
  <? if($pageOption['pageCount'] > 1): ?>	
    <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
        <?php echo $this->element('pagination');?>       
		</table> 
		<!--  end paging................ -->
  <? endif; ?>	

		</div>
	 
